#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>

using namespace boost::asio;
    
void print(system::error_code &e)
{
    cout << "hello asio" << endl;    
}

int main()
{
    io_service ios;
    deadline_timer t(ios, posix_time::seconds(2));
    
    t.async_wait(print);
    
    cout << "it show before t expired." << endl;
    ios.run();
    
    return 0;    
}    
